extends layout

block content
    h1 An application requests access to your data!
    form(action=action,method="POST")
        input(type="hidden",name="challenge",value=challenge)
        input(type="hidden",name="_csrf",value=csrfToken)

        if client.logo_uri
            img(src=client.logo_uri)

        p.
            Hi #{user}, application <strong>#{client.client_name || client.client_id}</strong> wants access resources on your behalf and to:

        each scope in requested_scope
            input(type="checkbox",id=scope,value=scope,name="grant_scope")
            label(for=scope) #{scope}
            br

        p.
            Do you want to be asked next time when this application wants to access your data? The application will
            not be able to ask for more permissions without your consent.
        ul
            if client.policy_uri
                li
                    a(href=client.policy_uri) Policy
            if client.tos_uri
                li
                    a(href=client.tos_uri) Terms of Service
        p
            input(type="checkbox",id="remember",name="remember",value="1")
            label(for="remember") Do not ask me again
        p
            input(type="submit",id="accept",name="submit",value="Allow access")
            input(type="submit",id="reject",name="submit",value="Deny access")
